<template>
	<view>
		<view class="todostyle">
			<label>
				<switch type="checkbox" @change="$emit('handleChange')" :checked="completed"/>
			</label>
			<view class="titlestyle">
				{{title}}
			</view>
			<button @click="$emit('delFn')" class="shanchustyle">删除</button>
		</view>
	</view>
</template>

<script>
	export default {
		name: "mytodos",
		props: ['title', 'completed'],
		emtis: ["handleChange", "delFn"],
		data() {
			return {

			};
		},
		created() {

		},
	}
</script>

<style>
	.todostyle {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.titlestyle {
		width: 420rpx;
	}
</style>